import api from '../api.js'
export default {
  GetOperatorListData (params) {
    return api.fetchGet('/operator/getListByPage.do', params);
  },
  FrozenOperator (params) {
    return api.fetchPost('/operator/frozen.do', params); 
  },
  EnableOperator (params) {
    return api.fetchPost('/operator/enable.do', params);
  },
  DelOperator (params) {
    return api.fetchPost('/operator/delOperator.do', params);
  },
  GetParkGroupPark (params) {
    return api.fetchGet('/operator/getParkGroupPark.do', params);
  },
  GetAreaParkTree (params) {
    return api.fetchGet('/operator/getAreaParkTree.do', params);
  },
  SaveBindPark (params) {
    return api.fetchPost('/operator/bindParkGroup.do', params);
  },
  EditOperatorPwd (params) {
    return api.fetchPost('/operator/modifyPwd.do', params);
  },
  GetOperatorAreaTree (params) {
    return api.fetchGet('/operator/getOperatorAreaTree.do', params);
  },
  GetAreaTree (params) {
    return api.fetchGet('/operator/getAreaTree.do', params);
  },
  SaveOperatorData (params) {
    var _url = "/operator/modifyOperator.do";
    if(params.id == null||params.id ==''){
      _url = '/operator/add.do';
    }
    return api.fetchPost(_url, params);
  },

  CheckLoginId (params){
    return api.fetchPost('/authz/user/is_login_id.do', params);
  }
}